home *** CD-ROM | disk | FTP | other *** search
/ Macmillan Math: Grade 1 …Pupil's Edition (Florida) / Math Grade 1 - Pupil's Edition (Florida).iso / pc / corsair / generic / javascript / media.js < prev    next >
Encoding:
Text File  |  2003-10-21  |  1.6 KB  |  75 lines

  1. var rs='resizable,scrollbars';
  2. var r='resizable';
  3. var s='scrollbars';
  4. var sn='scrollbars=no';
  5. var lts=new Array(1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,0,0,1,1,1,0,0,0);
  6. var tree=new Array(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,8,9,10,11,29,30,31,15,16,17);
  7. var ns=new Array(35);
  8. function oa(u,f,w,h)
  9. {
  10. openAssetWindow(u,f,w,h);
  11. }
  12. function ow(u,w,h)
  13. {
  14. openWebWindow(u,w,h);
  15. }
  16. function dt(node,start,len,x,y,w)
  17. {
  18.   if (node.expanded == false)
  19.   {
  20.     var end = start + len;
  21.     for (var i = start; i < end; i ++)
  22.     {
  23.         if (lts[i] == 1) // a submenu
  24.         {
  25.             ns[i]=new TreeMenu(x,y,w);
  26.             node.addList(ns[i],'l' + i);
  27.         }
  28.         else
  29.         {
  30.             node.addItem('l' + tree[i]);
  31.         }
  32.     }
  33.     node.expanded = true;
  34.   }
  35. }
  36. function dt1(node,start,len)
  37. {
  38. dt(node,start,len,20,61,440);
  39. }
  40. function hideChapter()
  41. {
  42. hideMenu(ns[0]);
  43. }
  44. function showChapter()
  45. {
  46. showMenu(ns[0]);
  47. }
  48. function dt2(node,start,len)
  49. {
  50. dt(node,start,len,8,61,400);
  51. }
  52. function hideType()
  53. {
  54. hideMenu(ns[18]);
  55. }
  56. function showType()
  57. {
  58. showMenu(ns[18]);
  59. }
  60. function init()
  61. {
  62. ns[0]=new TreeMenu(20,61,440);
  63. ns[0].setImage("/sailfish/images/medialibrary/true.gif","/sailfish/images/medialibrary/false.gif");
  64. ns[0].setStyle("openclose");
  65. dt1(ns[0],1,1);
  66. ns[0].build();
  67. ns[18]=new TreeMenu(8,61,400);
  68. ns[18].setImage("/sailfish/images/medialibrary/true.gif","/sailfish/images/medialibrary/false.gif");
  69. ns[18].setStyle("openclose");
  70. dt2(ns[18],19,2);
  71. ns[18].build();
  72. showMenu(ns[0]);
  73. hideMenu(ns[18]);
  74. }
  75.